
<?
    $cnt = count($allDests);
    $display = 0;
?>
<?
    for ($i = 0; $i < $cnt; $i++):
        if ($display == 8)
            break;

        $acc_count = $allDests[$i]->{$type};

        if ($acc_count != 0):

            $display++;

            $href = lang_url('search?dest_hot=' . $allDests[$i]->name . '&preview=1&acc_type=' . $acc_type)
            ?>
            <?
            $thumbnail = HOST_URL_HOTELS . 'gallery/destinations/' . $allDests[$i]->photo_path . '/thumb_157x123/' . $allDests[$i]->photo_name;
            if (!isset($allDests[$i]->photo_name) || $allDests[$i]->photo_name == "")
                $thumbnail = base_url() . 'assets/img/camera-icon.png';

            $preview = HOST_URL_HOTELS . 'gallery/destinations/' . $allDests[$i]->photo_path . '/thumb_454x340/' . $allDests[$i]->photo_name;
            ?>
            <div class="row">
                <a class="clearfix HoverImg" href="<?= $href ?>" data-id="<?= $preview ?>" title="<?= $allDests[$i]->name ?>">
                    <img src="<?= $thumbnail ?>" alt="<?= $allDests[$i]->name ?>" width="100">
                </a>
                <div>
                    <h5 class="ellipsis"><?= $allDests[$i]->name ?> <? // ($acc_count);      ?></h5>
                </div>
            </div>
            <?
        endif;
    endfor;
?>